#include "config.h"

//#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include "CLI.h"
#include "MatlabTest.h"
#include "problem1.h"
#if MODE==1
#include "engine.h"
#endif

//using namespace RandomLib;
using namespace std;

int main() {

    CLI::runCLIInterface();

    #if MODE==1
    Engine *ep;
    if (!(ep = engOpen("\0")))
    {
        fprintf(stderr, "\nCan't start MATLAB engine\n");
    }
    fprintf(stdout, "     *****     Sending data to MATLAB\n");
    #endif

    int problemNumber=1;
    int methodNumber=1;

    problem1 *problem=new problem1();
    Method::SubType methodType=(Method::SubType) (methodNumber-1);
    Method *method=Method::createMethod(methodType, problem, 100, 100);

    MatlabTest::lowerCoordinates(ep, problem, method);

    #if MODE==1
        engEvalString(ep,"save('matlab/workspace00')");
        engClose(ep);
    #endif

    delete problem;
    problem=0;
    delete method;
    method=0;

    return 0;
}


